var Metadata = {



    addOption: function(){
        var removeBtn = $("#removeBtn").val();
        var optionCount = $("#optionCount").val();
        var trHtml = "<tr id='itemRow" + optionCount + "'>";
        trHtml += "<td class='dbgrid_td'>";
        trHtml += "<input type='text' name='optionValue[]' style='width:180px;' />";
        trHtml += "</td>";
        trHtml += "<td class='dbgrid_td'>";
        trHtml += "<input type='text' name='optionTitle[]' style='width:180px;' />";
        trHtml += "</td>";
        trHtml += "<td class='dbgrid_td'>";
        trHtml += "<input type='text' name='optionOrder[]' style='width:40px;' />";
        trHtml += "</td>";
        trHtml += "<td class='dbgrid_td'>";
        trHtml += "<input type='button' value='" + removeBtn + "' onclick='javascript:Metadata.removeOption(\"itemRow"+ optionCount +"\");' />";
        trHtml += "</td>";
        trHtml += "</tr>";
        $("#metadataOptionBody").append(trHtml);
        optionCount = parseInt(optionCount)+1;
        $("#optionCount").val(optionCount);
    },

    removeOption: function(id){
        $("#" + id).remove();
    }
    
}